﻿<link href="/res/js/wysiwyg/jquery.wysiwyg.css" media="screen" rel="Stylesheet" type="text/css" />
<script type="text/javascript" src="/res/js/wysiwyg/jquery.wysiwyg.js"></script>
{literal}<script>
$(function()
{
    $('#wysiwyg').wysiwyg();
});
</script>{/literal}

<div class="add_category">
    <a href="/admin/pages/">Cтраницы</a> &rarr; Страница {$doc.name}
</div>
<form action="/admin/pages/go/" method="post" enctype="multipart/form-data">
<input type="hidden" name="type" value="edit" />
<input type="hidden" name="id" value="{$doc.id}" />

<div class="tabs">
        <ul class="tabNavigation">
            <li><a href="#soft">Основные данные</a></li>
            <li><a href="#meta">Мета теги</a></li>
            <li><a href="#css">Css стили</li>
            <li><a href="#js">JavaScript</a></li>
        </ul>
        
	<div id="soft"><div id="content">
			<div id="inner">
			<table cellspacing="0" cellpadding="4">
				<tbody class="edit">
					<tr>
						<th width="200px">Название страницы</th>
						<td><input type="text" name="name" value="{$doc.name}" /></td>
					</tr>
					<tr>
						<th width="200px">Описание</th>
						<td><textarea name="description" id="wysiwyg">{$doc.description}</textarea></td>
					</tr>
					<tr>
						<th width="200px" class="video">{if $doc.video}<a class="video" href="/res/img/category/{$doc.video}">Видеоролик</a>{else}Добавить видеоролик{/if}</th>
						<td><input type="file" name="uservideo" />{if $doc.video}<a class="deleteVideoPage" href="#" rel="{$doc.id}">Удалить</a>{/if}</td>
					</tr>
				</tbody>
			</table>
	</div></div></div>
    
    <div id="meta"><div id="content">
			<div class="round_t"><div> </div></div><div id="inner">
			<table cellspacing="0" cellpadding="4">
				<tbody class="edit">
                    <tr>
						<th width="200px">Титл</th>
						<td><input type="text" name="meta_title" value="{$doc.meta_title}" /></td>
					</tr>
                    <tr>
						<th width="200px">Ключевые слова</th>
						<td><input type="text" name="meta_keywords" value="{$doc.meta_keywords}" /></td>
					</tr>
                    <tr>
						<th width="200px">Описание страницы</th>
						<td><input type="text" name="meta_description" value="{$doc.meta_description}" /></td>
					</tr>
					<tr>
						<th width="200px">Slug (без пробелов, на англиском языке)</th>
						<td><input type="text" name="slug" value="{$doc.slug}" /></td>
					</tr>
                    <tr>
						<th width="200px">Ссылка</th>
						<td><input type="text" name="link" value="{$doc.link}"/></td>
					</tr>
				</tbody>
			</table>
	</div><div class="round_b"><div></div></div></div></div>
    
    <div id="css"><div id="content">
			<div class="round_t"><div></div></div><div id="inner">
			<table cellspacing="0" cellpadding="4">
				<tbody class="edit">
                    <tr>
						<th width="200px">Список Css</th>
						<td>
                            <select size="10" name="css[]" multiple>
                            {foreach from=$css item=css key=key}
                                <option value="{$key}" {$css}>{$key}</option>
                            {/foreach}
                            </select>
                        </td>
					</tr>
				</tbody>
			</table>
	</div><div class="round_b"><div></div></div></div></div>
    
    <div id="js"><div id="content">
			<div class="round_t"><div></div></div><div id="inner">
			<table cellspacing="0" cellpadding="4">
				<tbody class="edit">
                    <tr>
						<th width="200px">Список Js</th>
						<td>
                            <select size="10" name="js[]" multiple>
                            {foreach from=$js item=js key=key}
                                <option value="{$key}" {$js}>{$key}</option>
                            {/foreach}
                            </select>
                        </td>
					</tr>
				</tbody>
			</table>
	</div><div class="round_b"><div></div></div></div></div>
    </div>
	<br />
	<input type="submit" value="Сохранить" />
</form>
